package com.artisan.domain.repository;

import com.artisan.domain.entity.MCertificateType;
import com.artisan.domain.entity.QMAccount;
import com.artisan.domain.entity.QMCertificateType;
import com.artisan.domain.entity.QMRole;
import com.artisan.domain.repositoryInterface.ICertificateTypeRepository;
import com.querydsl.core.Tuple;
import com.querydsl.core.types.Predicate;
import com.querydsl.jpa.impl.JPAQuery;
import com.querydsl.jpa.impl.JPAQueryFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

@Repository
public abstract class CertificateTypeRepository implements ICertificateTypeRepository {
    @Autowired
    private JPAQueryFactory jpaQueryFactory;

    public JPAQuery<MCertificateType> find(Predicate predicate) {
        QMCertificateType certificateType = QMCertificateType.mCertificateType;

        JPAQuery<MCertificateType> result = jpaQueryFactory.selectFrom(certificateType).where(predicate);
        return result;
    }
}
